<template>
	<view class="orderUnderway">
		<view v-for="(item,index) in orderUnderway" :key="index" class="orderUnderway-list">
			<view class="orderUnderway-top">
				<view class="">{{item.oid}}</view>
				<view class="" @click="takeGoods(item.oid)">确认收货</view>
			</view>
			<view class="OrderList-item">
				<view class="item-img">
					<image :src="item.smallImg" mode="widthFix"></image>
				</view>
				<view class="item-desc">
					<view class="desc-top">
						<view class="">{{item.name}}</view>
						<view class="desc-top-rule">{{item.rule}}</view>
					</view>
					<view class="desc-middle">
						{{item.enname}}
					</view>
					<view class="desc-bottom">
						<view class="desc-bottom-price">¥{{item.price}}</view>
						<view class="">x{{item.count}}</view>
					</view>
				</view>
			</view>
			<view class="OrderList-msg">
				<view class="msg-time">{{item.createdAt}}</view>
				<view class="msg-bottom">
					<view class="bottom-count">共计 {{item.count}} 件</view>
					<view class="bottom-price">合计 ¥{{item.price}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	
	export default{
		props:{
			orderUnderway:Array
		},
		data() {
			return {
			}
		},
		methods:{
			takeGoods(e){
				this.$emit("receive",e)
			}
		}
	}
</script>

<style scoped>
	.orderUnderway-list{
		margin-top: 60rpx;
	}
	.orderUnderway-top{
		display: flex;
		justify-content: space-between;
	}
	.OrderList-item{
		display: flex;
		width: 100%;
		height: 168rpx;
		border: 1rpx solid #FFFFFF;
		margin-top: 30rpx;
	}
	.item-img{
		width: 25%;
	}
	.item-desc{
		margin-left: 10rpx;
		width: 65%;
	}
	.item-img>image{
		width: 100%;
	}
	.desc-top{
		display: flex;
	}
	.desc-top-rule{
		margin-left: 40rpx;
		color: #939393;
	}
	.desc-middle{
		color: #939393;
		margin-top: 15rpx;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	.desc-bottom{
		display: flex;
		justify-content: space-between;
		margin-top: 40rpx;
	}
	.desc-bottom-price{
		color: #0C34BA;
		font-weight: bold;
	}
	.OrderList-msg{
		margin-top: 40rpx;
		padding-top: 30rpx;
		border-top: 1rpx dashed #939393;
	}
	.msg-bottom{
		display: flex;
		justify-content: space-between;
		margin-top: 20rpx;
	}
	.bottom-price{
		font-weight: bold;
		color: #0C34BA;
	}
</style>
